﻿#region

using Minion.Win.Client.Constants;
using Minion.Win.Client.Service;
using Minion.Win.Client.Service.Concrete;
using Ninject;

#endregion

namespace Minion.Win.Client.IoC
{
    public static class Container
    {
        private static readonly IKernel Kernel = new StandardKernel();

        public static void Init()
        {
            Kernel.Bind<IDataService>().To<DataService>().Named(Mode.RealTime);
            Kernel.Bind<IDataService>().To<DemoDataService>().Named(Mode.Demo);
            Kernel.Bind<INotificationService>().To<NotificationService>().Named(Mode.RealTime);
            Kernel.Bind<INotificationService>().To<DemoNotificationService>().Named(Mode.Demo);
        }

        public static T Get<T>()
        {
            return Kernel.Get<T>();
        }

        public static T Get<T>(string name)
        {
            return Kernel.Get<T>(name);
        }
    }
}